package com.wms.dao;
import com.wms.domain.ClientsDomain;
import com.wms.domain.StorageDomain;
import com.wms.domain.StoreAreaDomain;
import com.wms.domain.StoreLocationDomain;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;
import org.mapstruct.Mapper;
import java.util.List;

@Mapper
public interface InformationMapper {
    public void addClients(ClientsDomain clientsDomain);

    public void updateClients(ClientsDomain clientsDomain);

    @Delete("DELETE FROM clients WHERE id = ${id}")
    void deleteClients(@Param("id") Long id);

    public int getClientsCount(ClientsDomain clientsDomain);
//    @Select("select name from clients")
//    public List<ClientsDomain> getClients(ClientsDomain clientsDomain);

    public List<ClientsDomain> getClientsPage(ClientsDomain clientsDomain);

    // Storage

    public void addStorage(StorageDomain storageDomain);

    public void updateStorage(StorageDomain storageDomain);

    @Delete("UPDATE Storage SET store_stat = 0 WHERE id = ${id}")
    void deleteStorage(@Param("id") Long id);

    public List<StorageDomain> getStoragePage(StorageDomain storageDomain);



    //StoreArea
    public void addStoreArea(StoreAreaDomain storeAreaDomain);

    public void updateStoreArea(StoreAreaDomain storeAreaDomain);

    @Delete("UPDATE store_area SET store_area_stat = 0 WHERE id = ${id}")
    void deleteStoreArea(@Param("id") Long id);

    public List<StoreAreaDomain> getStoreAreaPage(StoreAreaDomain storeAreaDomain);


    //StoreLocation
    public void addStoreLocation(StoreLocationDomain storeLocationDomain);

    public void updateStoreLocation(StoreLocationDomain storeLocationDomain);

    @Delete("UPDATE store_location SET store_location_stat = 0 WHERE id = ${id}")
    void deleteStoreLocation(@Param("id") Long id);

    public List<StoreLocationDomain> getStoreLocationPage(StoreLocationDomain storeLocationDomain);
}
